//
//  DiscoverCell.m
//  123
//
//  Created by Wang on 14/11/19.
//  Copyright (c) 2014年 Wang. All rights reserved.
//

#import "DiscoverCell.h"

@implementation DiscoverCell

- (void)dealloc
{
    [_leftImageView release];
    [_rightLabel release];
    [super dealloc];
}

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        
        self.leftImageView = [[[UIImageView alloc] initWithFrame:CGRectZero] autorelease];
        [self addSubview:_leftImageView];
        
        self.rightLabel = [[[UILabel alloc] initWithFrame:CGRectZero] autorelease];
        [_rightLabel setTextColor:[UIColor blackColor]];
        [self addSubview:_rightLabel];
    }
    
    return self;
}

- (void)layoutSubviews
{
    [super layoutSubviews];
    
    [_leftImageView setFrame:CGRectMake(0, 0, self.frame.size.width / 8, self.frame.size.height)];
    
    [_rightLabel setFrame:CGRectMake(_leftImageView.frame.size.width + 10, 0, self.frame.size.width / 8 * 2, self.frame.size.height)];
}




- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
